/*
* MiddleResultController.java
* Created on  2015/6/7 22:18
* 版本       修改时间          作者      修改内容
* V1.0.1    2015/6/7       xfz    初始版本
*
*/

package com.infitecs.eyas.result;

import com.infitecs.eyas.result.service.MiddleResultService;
import com.infitecs.krill.ajax.response.AjaxResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * 类的描述信息
 *
 * @author xfz
 * @version 1.0.1
 */
@Controller
@RequestMapping("/result")
public class MiddleResultController {
    @Autowired
    private MiddleResultService middleResultService;

    /*公式8*/
    @RequestMapping(value = "/calculateE47", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE47(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E47 = String.valueOf(middleResultService.calculateE47(caseId, powerId));
        return new AjaxResponse(E47);
    }

    /*判断公式9*/
    @RequestMapping(value = "/calculateE48", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE48(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E48 = String.valueOf(middleResultService.calculateE48(caseId, powerId));
        return new AjaxResponse(E48);
    }

    /*公式10*/
    @RequestMapping(value = "/calculateE49", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE49(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E49 = String.valueOf(middleResultService.calculateE49(caseId, powerId));
        return new AjaxResponse(E49);
    }

    @RequestMapping(value = "/calculateE51", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE51(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        String E51 = String.valueOf(middleResultService.calculateE51(caseId));
        return new AjaxResponse(E51);
    }

    @RequestMapping(value = "/calculateE52", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE52(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E52 = String.valueOf(middleResultService.calculateE52(caseId, powerId));
        return new AjaxResponse(E52);
    }

    @RequestMapping(value = "/calculateE53", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE53(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E53 = String.valueOf(middleResultService.calculateE53(caseId, powerId));
        return new AjaxResponse(E53);
    }

    @RequestMapping(value = "/calculateE55", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE55(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E55 = String.valueOf(middleResultService.calculateE55(caseId, powerId));
        return new AjaxResponse(E55);
    }

    @RequestMapping(value = "/calculateE56", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE56(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E56 = String.valueOf(middleResultService.calculateE56(caseId, powerId));
        return new AjaxResponse(E56);
    }

    @RequestMapping(value = "/calculateE57", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE57(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E57 = String.valueOf(middleResultService.calculateE57(caseId, powerId));
        return new AjaxResponse(E57);
    }

    @RequestMapping(value = "/calculateE58", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE58(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E58 = String.valueOf(middleResultService.calculateE58(caseId, powerId));
        return new AjaxResponse(E58);
    }

    @RequestMapping(value = "/calculateE59", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE59(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E59 = String.valueOf(middleResultService.calculateE59(caseId, powerId));
        return new AjaxResponse(E59);
    }

    @RequestMapping(value = "/calculateE64", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE64(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E64 = String.valueOf(middleResultService.calculateE64(caseId, powerId));
        return new AjaxResponse(E64);
    }

    @RequestMapping(value = "/calculateE65", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE65(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E65 = String.valueOf(middleResultService.calculateE65(caseId, powerId));
        return new AjaxResponse(E65);
    }

    @RequestMapping(value = "/calculateE66", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE66(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E66 = String.valueOf(middleResultService.calculateE66(caseId, powerId));
        return new AjaxResponse(E66);
    }

    @RequestMapping(value = "/calculateE67", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE67(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E67 = String.valueOf(middleResultService.calculateE67(caseId, powerId));
        return new AjaxResponse(E67);
    }

    @RequestMapping(value = "/calculateE68", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE68(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E68 = String.valueOf(middleResultService.calculateE68(caseId, powerId));
        return new AjaxResponse(E68);
    }

    @RequestMapping(value = "/calculateE69", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE69(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E69 = String.valueOf(middleResultService.calculateE69(caseId, powerId));
        return new AjaxResponse(E69);
    }

    @RequestMapping(value = "/calculateE70", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE70(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E70 = String.valueOf(middleResultService.calculateE70(caseId, powerId));
        return new AjaxResponse(E70);
    }

    @RequestMapping(value = "/calculateE71", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE71(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E71 = String.valueOf(middleResultService.calculateE71(caseId, powerId));
        return new AjaxResponse(E71);
    }

    @RequestMapping(value = "/calculateE72", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE72(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E72 = String.valueOf(middleResultService.calculateE72(caseId, powerId));
        return new AjaxResponse(E72);
    }

    @RequestMapping(value = "/calculateE73", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE73(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E73 = String.valueOf(middleResultService.calculateE73(caseId, powerId));
        return new AjaxResponse(E73);
    }

    @RequestMapping(value = "/calculateE74", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE74(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E74 = String.valueOf(middleResultService.calculateE74(caseId, powerId));
        return new AjaxResponse(E74);
    }

    @RequestMapping(value = "/calculateE75", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE75(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E75 = String.valueOf(middleResultService.calculateE75(caseId, powerId));
        return new AjaxResponse(E75);
    }

    @RequestMapping(value = "/calculateE76", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE76(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E76 = String.valueOf(middleResultService.calculateE76(caseId, powerId));
        return new AjaxResponse(E76);
    }

    @RequestMapping(value = "/calculateE77", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE77(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E77 = String.valueOf(middleResultService.calculateE77(caseId, powerId));
        return new AjaxResponse(E77);
    }

    @RequestMapping(value = "/calculateE78", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE78(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E78 = String.valueOf(middleResultService.calculateE78(caseId, powerId));
        return new AjaxResponse(E78);
    }

    @RequestMapping(value = "/calculateE79", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE79(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E79 = String.valueOf(middleResultService.calculateE79(caseId, powerId));
        return new AjaxResponse(E79);
    }

    @RequestMapping(value = "/calculateE80", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE80(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E80 = String.valueOf(middleResultService.calculateE80(caseId, powerId));
        return new AjaxResponse(E80);
    }

    @RequestMapping(value = "/calculateE60", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE60(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E60 = String.valueOf(middleResultService.calculateE60(caseId, powerId));
        return new AjaxResponse(E60);
    }

    @RequestMapping(value = "/calculateE62", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE62(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E62 = String.valueOf(middleResultService.calculateE62(caseId, powerId));
        return new AjaxResponse(E62);
    }

    @RequestMapping(value = "/calculateE81", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE81(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E81 = String.valueOf(middleResultService.calculateE81(caseId, powerId));
        return new AjaxResponse(E81);
    }

    @RequestMapping(value = "/calculateE82", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE82(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E82 = String.valueOf(middleResultService.calculateE82(caseId, powerId));
        return new AjaxResponse(E82);
    }

    @RequestMapping(value = "/calculateE96", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE96(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E96 = String.valueOf(middleResultService.calculateE96(caseId, powerId));
        return new AjaxResponse(E96);
    }

    @RequestMapping(value = "/calculateE97", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE97(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E97 = String.valueOf(middleResultService.calculateE97(caseId, powerId));
        return new AjaxResponse(E97);
    }

    @RequestMapping(value = "/calculateE98", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE98(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E98 = String.valueOf(middleResultService.calculateE98(caseId, powerId));
        return new AjaxResponse(E98);
    }

    @RequestMapping(value = "/calculateE99", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE99(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E99 = String.valueOf(middleResultService.calculateE99(caseId, powerId));
        return new AjaxResponse(E99);
    }

    @RequestMapping(value = "/calculateE100", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE100(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E100 = String.valueOf(middleResultService.calculateE100(caseId, powerId));
        return new AjaxResponse(E100);
    }

    @RequestMapping(value = "/calculateE101", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE101(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E101 = String.valueOf(middleResultService.calculateE101(caseId, powerId));
        return new AjaxResponse(E101);
    }

    @RequestMapping(value = "/calculateE102", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE102(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E102 = String.valueOf(middleResultService.calculateE102(caseId, powerId));
        return new AjaxResponse(E102);
    }

    @RequestMapping(value = "/calculateE103", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE103(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E103 = String.valueOf(middleResultService.calculateE103(caseId, powerId));
        return new AjaxResponse(E103);
    }

    @RequestMapping(value = "/calculateE104", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE104(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E104 = String.valueOf(middleResultService.calculateE104(caseId, powerId));
        return new AjaxResponse(E104);
    }

    @RequestMapping(value = "/calculateE105", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE105(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E105 = String.valueOf(middleResultService.calculateE105(caseId, powerId));
        return new AjaxResponse(E105);
    }

    @RequestMapping(value = "/calculateE106", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE106(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E106 = String.valueOf(middleResultService.calculateE106(caseId, powerId));
        return new AjaxResponse(E106);
    }

    @RequestMapping(value = "/calculateE107", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE107(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E107 = String.valueOf(middleResultService.calculateE107(caseId, powerId));
        return new AjaxResponse(E107);
    }

    @RequestMapping(value = "/calculateE108", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE108(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E108 = String.valueOf(middleResultService.calculateE108(caseId, powerId));
        return new AjaxResponse(E108);
    }

    @RequestMapping(value = "/calculateE109", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE109(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E109 = String.valueOf(middleResultService.calculateE109(caseId, powerId));
        return new AjaxResponse(E109);
    }

    @RequestMapping(value = "/calculateE110", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE110(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E110 = String.valueOf(middleResultService.calculateE110(caseId, powerId));
        return new AjaxResponse(E110);
    }

    @RequestMapping(value = "/calculateE112", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE112(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E112 = String.valueOf(middleResultService.calculateE112(caseId, powerId));
        return new AjaxResponse(E112);
    }

    @RequestMapping(value = "/calculateE113", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE113(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E113 = String.valueOf(middleResultService.calculateE113(caseId, powerId));
        return new AjaxResponse(E113);
    }

    @RequestMapping(value = "/calculateE114", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE114(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E114 = String.valueOf(middleResultService.calculateE114(caseId, powerId));
        return new AjaxResponse(E114);
    }

    @RequestMapping(value = "/calculateE115", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE115(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E115 = String.valueOf(middleResultService.calculateE115(caseId, powerId));
        return new AjaxResponse(E115);
    }

    @RequestMapping(value = "/calculateE116", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE116(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E116 = String.valueOf(middleResultService.calculateE116(caseId, powerId));
        return new AjaxResponse(E116);
    }

    @RequestMapping(value = "/calculateE117", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE117(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E117 = String.valueOf(middleResultService.calculateE117(caseId, powerId));
        return new AjaxResponse(E117);
    }

    @RequestMapping(value = "/calculateE118", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE118(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E118 = String.valueOf(middleResultService.calculateE118(caseId, powerId));
        return new AjaxResponse(E118);
    }

    @RequestMapping(value = "/calculateE119", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE119(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E119 = String.valueOf(middleResultService.calculateE119(caseId, powerId));
        return new AjaxResponse(E119);
    }

    @RequestMapping(value = "/calculateE120", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE120(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E120 = String.valueOf(middleResultService.calculateE120(caseId, powerId));
        return new AjaxResponse(E120);
    }

    @RequestMapping(value = "/calculateE121", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE121(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E121 = String.valueOf(middleResultService.calculateE121(caseId, powerId));
        return new AjaxResponse(E121);
    }

    @RequestMapping(value = "/calculateE122", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE122(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E122 = String.valueOf(middleResultService.calculateE122(caseId, powerId));
        return new AjaxResponse(E122);
    }

    @RequestMapping(value = "/calculateE123", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE123(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E123 = String.valueOf(middleResultService.calculateE123(caseId, powerId));
        return new AjaxResponse(E123);
    }

    @RequestMapping(value = "/calculateE124", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE124(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E124 = String.valueOf(middleResultService.calculateE124(caseId, powerId));
        return new AjaxResponse(E124);
    }

    @RequestMapping(value = "/calculateE125", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE125(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E125 = String.valueOf(middleResultService.calculateE125(caseId, powerId));
        return new AjaxResponse(E125);
    }

    @RequestMapping(value = "/calculateE126", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE126(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E126 = String.valueOf(middleResultService.calculateE126(caseId, powerId));
        return new AjaxResponse(E126);
    }

    @RequestMapping(value = "/calculateE127", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE127(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E127 = String.valueOf(middleResultService.calculateE127(caseId, powerId));
        return new AjaxResponse(E127);
    }

    @RequestMapping(value = "/calculateE128", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE128(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E128 = String.valueOf(middleResultService.calculateE128(caseId, powerId));
        return new AjaxResponse(E128);
    }

    @RequestMapping(value = "/calculateE129", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE129(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E129 = String.valueOf(middleResultService.calculateE129(caseId, powerId));
        return new AjaxResponse(E129);
    }

    @RequestMapping(value = "/calculateE130", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE130(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E130 = String.valueOf(middleResultService.calculateE130(caseId, powerId));
        return new AjaxResponse(E130);
    }

    @RequestMapping(value = "/calculateE131", method = {RequestMethod.POST})
    @ResponseBody
    public AjaxResponse calculateE131(HttpSession httpSession) {
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(httpSession.getAttribute("powerId").toString());
        String E131 = String.valueOf(middleResultService.calculateE131(caseId, powerId));
        return new AjaxResponse(E131);
    }

    @RequestMapping(value = "culAll", method = RequestMethod.POST)
    @ResponseBody
    public void culAll(HttpSession session) {
        long b = System.currentTimeMillis();
        int caseId = Integer.parseInt(session.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(session.getAttribute("powerId").toString());
        try {
            middleResultService.calculateE47(caseId, powerId);
            middleResultService.calculateE48(caseId, powerId);
            middleResultService.calculateE49(caseId, powerId);
            middleResultService.calculateE51(caseId);
            middleResultService.calculateE52(caseId, powerId);
            middleResultService.calculateE53(caseId, powerId);
            middleResultService.calculateE55(caseId, powerId);
            middleResultService.calculateE56(caseId, powerId);
            middleResultService.calculateE57(caseId, powerId);
            middleResultService.calculateE58(caseId, powerId);
            middleResultService.calculateE59(caseId, powerId);
            middleResultService.calculateE64(caseId, powerId);
            middleResultService.calculateE65(caseId, powerId);
            middleResultService.calculateE66(caseId, powerId);
            middleResultService.calculateE67(caseId, powerId);
            middleResultService.calculateE68(caseId, powerId);
            middleResultService.calculateE69(caseId, powerId);
            middleResultService.calculateE70(caseId, powerId);
            middleResultService.calculateE71(caseId, powerId);
            middleResultService.calculateE72(caseId, powerId);
            middleResultService.calculateE73(caseId, powerId);
            middleResultService.calculateE74(caseId, powerId);
            middleResultService.calculateE75(caseId, powerId);
            middleResultService.calculateE76(caseId, powerId);
            middleResultService.calculateE60(caseId, powerId);
            middleResultService.calculateE62(caseId, powerId);
            middleResultService.calculateE77(caseId, powerId);
            middleResultService.calculateE78(caseId, powerId);
            middleResultService.calculateE79(caseId, powerId);
            middleResultService.calculateE80(caseId, powerId);
            middleResultService.calculateE81(caseId, powerId);
            middleResultService.calculateE82(caseId, powerId);
            middleResultService.calculateE83(caseId, powerId);
            middleResultService.calculateE84(caseId, powerId);
            middleResultService.calculateE85(caseId, powerId);
            middleResultService.calculateE86(caseId, powerId);
            middleResultService.calculateE87(caseId, powerId);
            middleResultService.calculateE91(caseId,powerId);
            System.out.println(System.currentTimeMillis() - b);
        }catch (Exception e){

        }
    }
    @RequestMapping(value = "calAll",method = RequestMethod.POST)
    @ResponseBody
    public void calAll(HttpSession session){
        int caseId = Integer.parseInt(session.getAttribute("caseId").toString());
        int powerId = Integer.parseInt(session.getAttribute("powerId").toString());
        middleResultService.calculateE96(caseId, powerId);
        middleResultService.calculateE97(caseId, powerId);
        middleResultService.calculateE98(caseId, powerId);
        middleResultService.calculateE99(caseId, powerId);
        middleResultService.calculateE100(caseId, powerId);
        middleResultService.calculateE101(caseId, powerId);
        middleResultService.calculateE102(caseId, powerId);
        middleResultService.calculateE103(caseId, powerId);
        middleResultService.calculateE104(caseId, powerId);
        middleResultService.calculateE105(caseId, powerId);
        middleResultService.calculateE106(caseId, powerId);
        middleResultService.calculateE107(caseId, powerId);
        middleResultService.calculateE108(caseId, powerId);
        middleResultService.calculateE109(caseId, powerId);
        middleResultService.calculateE110(caseId, powerId);
        middleResultService.calculateE112(caseId, powerId);
        middleResultService.calculateE113(caseId, powerId);
        middleResultService.calculateE114(caseId, powerId);
        middleResultService.calculateE115(caseId, powerId);
        middleResultService.calculateE116(caseId, powerId);
        middleResultService.calculateE117(caseId, powerId);
        middleResultService.calculateE118(caseId, powerId);
        middleResultService.calculateE119(caseId, powerId);
        middleResultService.calculateE120(caseId, powerId);
        middleResultService.calculateE121(caseId, powerId);
        middleResultService.calculateE122(caseId, powerId);
        middleResultService.calculateE123(caseId, powerId);
        middleResultService.calculateE124(caseId, powerId);
        middleResultService.calculateE125(caseId, powerId);
        middleResultService.calculateE126(caseId, powerId);
        middleResultService.calculateE127(caseId, powerId);
        middleResultService.calculateE128(caseId, powerId);
        middleResultService.calculateE129(caseId, powerId);
        middleResultService.calculateE130(caseId, powerId);
        middleResultService.calculateE131(caseId, powerId);
    }
}
